// 表示引入了utils下的request.js文件
import request from '@/utils/request'

export default {
  //获取课程学生信息
  selectCourseStu() {
    return request({
      url: `/eduservice/announcement/selectCourseStu/`,
      method: 'get',
    })
  },

  //获取课程学生信息
  publish(annoInfo) {
    return request({
      url: `/eduservice/announcement/publish/`,
      method: 'post',
      data: annoInfo
    })
  },

  // 获取公告列表的方法
  getPageList(current, limit, searchObj) {
    return request({
      url: `/eduservice/announcement/selectPage/` + current + `/` + limit,
      method: 'post',
      data: searchObj
    })
  },
  // 删除公告执行的方法
  deleteAnno(annoId) {
    return request({
      url: `/eduservice/announcement/deleteAnno/` + annoId,
      method: 'get',
    })
  },
  // 根据公告id查看公告基本信息
  selectInfo(annoId) {
    return request({
      url: `/eduservice/announcement/selectInfo/` + annoId,
      method: 'get',
    })
  },
  // 根据公告id获取公告对象集合
  selectUsers(annoId, searchObj) {
    return request({
      url: `/eduservice/announcement/selectUsers/` + annoId,
      method: 'post',
      data: searchObj
    })
  },
  sendMsmToStu(mobile){
    return request({
      url: `/eduservice/announcement/sendMsmToStu/` + mobile,
      method: 'post',
    })
  },
  updateAnno(annoInfo,annoId){
    return request({
      url: `/eduservice/announcement/updateAnno/` + annoId,
      method: 'post',
      data:annoInfo,
    })
  }
}